import 'dart:convert' show json;
import 'package:flutter/foundation.dart';

void tryCatch(Function f) {
  try {
    f?.call();
  } catch (e, stack) {
    debugPrint("$e"); 
  debugPrint("$stack");
    }
}

class FolloewModel {
  int _errno;
  int get errno => _errno;
  bool _data;
  bool get data => _data;
  String _errmsg;
  String get errmsg => _errmsg;

    FolloewModel({
int errno,
bool data,
String errmsg,
}):_errno=errno,_data=data,_errmsg=errmsg;
  factory FolloewModel.fromJson(jsonRes)=>jsonRes == null? null:FolloewModel(    errno : jsonRes['errno'],
    data : jsonRes['data'],
    errmsg : jsonRes['errmsg'],
);
  Map<String, dynamic> toJson() => {
        'errno': _errno,
        'data': _data,
        'errmsg': _errmsg,
};

  @override
String  toString() {
    return json.encode(this);
  }
}

